package com.util;

import java.util.Comparator;
import java.util.HashMap;

import static java.lang.Integer.parseInt;

/**
 * Created by wlc on 2018/3/26.
 */
public class GlobalArgs {
    /**
     * Database Args
     */
//    public static String DataBase_Url = "jdbc:mysql://114.212.160.59:3306/GenomeDatabase";
    public static String DataBase_Url = "jdbc:mysql://221.226.81.54:30012/genomedatabase?characterEncoding=UTF-8";
    public static String DataBase_User = "root";
    public static String DataBase_Password = "waas87157078";
    public static String DataBase_Driven = "com.mysql.jdbc.Driver";



    /**
     * DatabasePool Args
     */
    public static final int step = 2;
    public static final int MaxCount = 100;
    public static final int InitCount = 10;


    /**
     * Qm_Args
     */
    public static HashMap<String,String> base_index_compute = new HashMap<String,String>(){{
        put("作者","QM_USER_AND_PBC-author");
        put("日期","QM_USER_AND_PBC-date");
        //put("CAS号","QM_CalculationObject_SolventSolute-19");
    }};


    /**
     * Qm_Args
     */
    public static HashMap<String, String> base_index_compute_track = new HashMap<String, String>() {{
        put("作者", "QM_Caluculation_Track-author");
        //put("CAS号","QM_CalculationObject_SolventSolute-19");
    }};

    /**
     * Experiment_Args
     */
    public static HashMap<String, String> base_index_experiment = new HashMap<String, String>() {
        {
            put("作者", "experiment_User_AND_Method-1");
            put("日期", "experiment_User_AND_Method-2");
            put("DOI号", "experiment_User_AND_Method-3");
        }
    };


    /**
     * BoneTumor_Args
     */
    public static HashMap<String, String> base_index_boneTumor = new HashMap<String, String>() {
        {
            put("病患姓名", "BoneTumor_user_Information-userInfo_name");
            put("手术部位", "BoneTumor_visit_Information-visitInfo_site");
            put("病理诊断", "BoneTumor_visit_Information-visitInfo_pathologicalDiagnosis");
        }
    };


    /**
     * Cookie_Args NJUMaterialDatabase_userInfor
     */
    public static String UserCookie_key = "ATTRMaterialDatabase_userInfor";

    /**
     * Comparator_Args
     */
    public static Comparator StringInt_max_min = new Comparator<String>(){
        @Override
        public int compare(String o1, String o2){
            if(parseInt(o1)<parseInt(o2))
                return 1;
            else
                return -1;
        }
    };

}
